﻿Kiem tra phien ban CentOS : # rpm --query centos-release
#mkdir /mnt/cdrom1
#mount /dev/cdrom  /mnt/cdrom1
#cd /mnt/cdrom1/Packages
#find bind*
#rpm -ivh <goi-bind-need-install>

https://anninhmang.edu.vn/cau-hinh-dns-server-tren-centos/
DIA CHI ATHENA: https://www.youtube.com/watch?v=R2Qf4-qc1kQ

BUOC O:
Noi dung file /etc/hosts
192.168.100.128	server67	server67.concung.com
---------------------------------------------------------------------
BUOC 1:
Noi dung file /etc/resolv.conf
search concung.com
domain concung.com
nameserver 192.168.100.1
--------------------------------------------------------------------------------------
BUOC 2:
Nội dung file /etc/sysconfig/network
NETWORKING=yes
HOSTNAME =server67.concung.com
--------------------------------------------------------------------------------------
BUOC 3:
Noi dung file /etc/named.conf
options {
	listen-on port 53 { 172.0.0.1; any; }
        .......
	allow-query { localhost; any; };
--------------------------------------------------------------------------------------
BUOC 4:
Noi dung file nano /etc/named.rfc1912.zones
zone "concung.com" IN {
	type master;
	file "concung.zone";
	allow-update { none; };
};


zone "1.168.192.in-addr-arpa" IN {
	type master;
	file "concung.local";
	allow-update { none; };
};

--------------------------------------------------------------------------------------
BUOC 5:
Noi dung file nano /var/named/concung.zone
$TTL
@	IN	SOA 		server67.concung.com root.concung.com (
			0	; serial
			1D	; refresh
			1H	; retry
			1W	; expired
			3H	; minimum
)
		IN	NS	computer-name.concung.com.
server67	IN	A	192.168.100.128
www		IN	CNAME	server67.concung.com.

--------------------------------------------------------------------------------------
Noi dung file nano /var/named/concung.local
$TTL
@	IN	SOA 		computer-name.concung.com root.concung.com (
			0	; serial
			1D	; refresh
			1H	; retry
			1W	; expired
			3H	; minimum
)
		IN	NS	computer-name.concung.com.
1		IN	PTR	computer-name.concung.com.
---------------------------------------------------------------------------------------
BUOC 6 : SET PERMISSION
our zone files are not loading due to a problem with file permissions. 
Check the files and make sure that they are readable by the user that named executes as. 
If you aren't sure what user that is, check the process table after you've started it.
************************************************************************************
QUAN TRONG !!!! (Thiet lap quyen 600 hoac 777 cho 2 tap tin nay)
#chmod 777 /var/named/concung.zone
#chmod 777 /var/named/concung.local
************************************************************************************	
BUOC 7 : Mo port 53 tuong lua tu file cau hinh iptables hoac tat tuong lua #service iptables stop !!!!!!!!!!!	